<?php
echo $this->Html->css('index.style');
?>
<div id="breadcrumbs">
    <ol class="breadcrumb">
        <li><?php echo $this->Html->link('Trang chủ',array('controller' => 'indexpage', 'action' => 'index_view' )); ?></a></li>
        <li><?php echo $this->Html->link('Sản phẩm',array('controller' => 'indexpage', 'action' => 'view_products' )); ?></a></li>
        <li>Tìm theo:</li>
            <div class="btn-group">
               <button  class="btn btn-info dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                   Mức giá <span class="caret"></span>
               </button>
           <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                <li>
                    <?php echo $this->Html->link('Dưới 1 triệu',array('controller' => 'indexpage', 'action' => 'view_products_price', '1')); ?>
                    <?php echo $this->Html->link('Từ 1 - 2 triệu',array('controller' => 'indexpage', 'action' => 'view_products_price', '2')); ?>
                    <?php echo $this->Html->link('Từ 2 - 3 triệu',array('controller' => 'indexpage', 'action' => 'view_products_price', '3')); ?>
                    <?php echo $this->Html->link('Từ 3 - 4 triệu',array('controller' => 'indexpage', 'action' => 'view_products_price', '4')); ?>
                    <?php echo $this->Html->link('Từ 4 - 5 triệu',array('controller' => 'indexpage', 'action' => 'view_products_price', '5')); ?>
                    <?php echo $this->Html->link('Trên 5 triệu',array('controller' => 'indexpage', 'action' => 'view_products_price', '6')); ?>
                </li>
            </ul>
        </div>
        <div class="btn-group">
            <button  class="btn btn-info dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                Hãng sản xuất <span class="caret"></span>
            </button>
            <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                <?php foreach($manufactures as $manufacture): ?>
                    <li>
                        <?php echo $this->Html->link($manufacture['Manufacture']['manufacture_name'],array('controller' => 'indexpage', 'action' => 'view_products_manufacture', $manufacture['Manufacture']['id'])); ?>
                    </li>
                <?php endforeach; ?>
            </ul>
   </div>

    </ol>

</div>
<div class="container" style="min-height:900px">
    <div class="row" id="list_product">
        <?php foreach ($mobileDetails as $mobileDetail): ?>
            <div class="col-md-2">
                <div class="thumbnail img-responsive" >
                    <?php echo $this->Html->image($mobileDetail['Modell']['image_url'],array('fullBase' => true)); ?>
                    <div class="caption">
                        <h4><?php echo $this->Html->link($mobileDetail['Modell']['mobile_name'], array('controller' => 'indexpage', 'action' => 'view_mobiledetail', $mobileDetail['Modell']['id'])); ?></h4>
                        <p><?php echo h($mobileDetail['Modell']['retail_price']); ?> VND</p>

                        <p><a href="#" class="btn btn-primary" role="button">Add to card</a></p>
                    </div>
                </div>
            </div>

        <?php endforeach; ?>
        <div class="paging">
            <?php
            echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));
            echo $this->Paginator->numbers(array('separator' => ''));
            echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));
            ?>
        </div>
    </div>
</div>